package cn.com.checne.dao;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class BaseDao {
	public boolean truncateTable(String tableName) {
		try {
			Connection conn = DBFactory.getInstance().getConnection();
			String sql = "truncate table " + tableName;
			Statement stmt = conn.createStatement();
			stmt.execute(sql);
			stmt.close();
			conn.close();
			return true;
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return false;
	}

	public static void main(String[] args) {
		BaseDao dao = new BaseDao();
		dao.truncateTable("tbl_website_c");
	}
}